package org.jeecg.modules.knowledgerelation.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.knowledgerelation.KnowledgeTreeVO;
import org.jeecg.modules.knowledgerelation.entity.KnowledgeRelation;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @Description: 知识之间的关系
 * @Author: jeecg-boot
 * @Date:   2020-12-20
 * @Version: V1.0
 */
public interface IKnowledgeRelationService extends IService<KnowledgeRelation> {

    /**
     * TODO: 维护知识库的关系，分页获取知识库的关系信息
     *
     *
     * @author ZhangHaoyu
     * @param page
     * @param req
     * @return java.util.List<org.jeecg.modules.knowledgerelation.entity.KnowledgeRelation>
     */
    IPage<KnowledgeRelation> mypage(Page<KnowledgeRelation> page, HttpServletRequest req);

    /**
     * TODO: app 获取知识库关系树
     *
     *
     * @author ZhangHaoyu
     * @return java.util.List<org.jeecg.modules.knowledgerelation.KnowledgeTreeVO>
     */
    List<KnowledgeTreeVO> getTree();

    /**
     * app根据当前知识获取对应的知识树
     *
     * @return
     */
    List<KnowledgeTreeVO> getTreeByknowledge(String id);
}
